import java.util.Scanner;

public class Round {
    private double r;
    private double PI = 3.14;
    public Round() {

    }
    public double getR() {
        return r;
    }

    public void setR(double r) {
        this.r = r;
    }

    public double getArea() {
        return (PI*r*r);
    }

    public double getGirth() {
        return (2*PI*r);
    }
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("  ==== 计算圆面积周长 ====");
        System.out.println("请输入圆的半径:");
        double radius = input.nextDouble();
        Round c = new Round();
        c.setR(radius);
        System.out.println("半径为" + radius + "的圆面积:" + String.format("%.2f",c.getArea()));
        System.out.println("半径为" + radius + "的圆周长:" + String.format("%.2f",c.getGirth()));
    }
}



